<%@ page import="books4africa.Books" %>



<div class="fieldcontain ${hasErrors(bean: booksInstance, field: 'title', 'error')} required">
	<label for="title">
		<g:message code="books.title.label" default="Title" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="title" required="" value="${booksInstance?.title}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: booksInstance, field: 'author', 'error')} required">
	<label for="author">
		<g:message code="books.author.label" default="Author" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="author" required="" value="${booksInstance?.author}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: booksInstance, field: 'isbn', 'error')} ">
	<label for="isbn">
		<g:message code="books.isbn.label" default="Isbn" />
		
	</label>
	<g:textField name="isbn" pattern="${booksInstance.constraints.isbn.matches}" value="${booksInstance?.isbn}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: booksInstance, field: 'description', 'error')} ">
	<label for="description">
		<g:message code="books.description.label" default="Description" />
		
	</label>
	<g:textArea name="description" value="${booksInstance?.description}"></g:textArea>
</div>

<div class="fieldcontain ${hasErrors(bean: booksInstance, field: 'category', 'error')} ">
	<label for="category">
		<g:message code="books.category.label" default="Category" />
		
	</label>
	<g:select name="category" from="${booksInstance.constraints.category.inList}" value="${booksInstance?.category}" valueMessagePrefix="books.category" noSelection="['': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: booksInstance, field: 'minGradeLevel', 'error')} required">
	<label for="minGradeLevel">
		<g:message code="books.minGradeLevel.label" default="Min Grade Level" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="minGradeLevel" from="${['0', '1', '2', '3', '4', '5', '6']}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: booksInstance, field: 'maxGradeLevel', 'error')} required">
	<label for="maxGradeLevel">
		<g:message code="books.maxGradeLevel.label" default="Max Grade Level" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="maxGradeLevel" from="${['0', '1', '2', '3', '4', '5', '6']}"/>
</div>
<div class="fieldcontain ${hasErrors(bean: booksInstance, field: 'edition', 'error')} required">
	<label for="edition">
		<g:message code="books.edition.label" default="Edition" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="edition" type="number" required="" value="${fieldValue(bean: booksInstance, field: 'edition')}"/>
</div>
